<%@ page language="java" import="java.util.*,com.maya.model.*"
  pageEncoding="UTF-8"%>
  <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<div id="header">
  <div id="center_h">
    <div id="logo">
      <a href="">Quora</a>
    </div>
    <div id="add_ask">
  
      <form action="viewallquestions">
      <input class="search_input"type="text" placeholder="搜索 话题 问题或人" name="searchContent">
	  <input class="search_btn" type="submit" value="搜索" style="display:none">
	  </form>
	  </div>
    <a href="<%=path%>/resources/createAsk.jsp">提问题</a> 
    <div id="top-menu">
      <ul>
      
        <%        	
            User me = (User) session.getAttribute("currUser");
            if (null != me) {
        %>
        <li>
          <a href="">首页</a>
        </li>
        <li>
          <a href="viewuser?userid=<%=me.getId() %>"> <%=me.getName()%></a>
        </li>
        <li>
          <a href="logout"> 退出</a>
        </li>
        <%
            }
            else {
        %>
        <li>
          <a href="viewallquestions">随便看看</a>
        </li>
        <li>
          <a href="<%=path%>/resources/login.jsp">登录</a>
        </li>
        <li>
          <a href="<%=path%>/resources/reg.jsp">注册</a>
        </li>
        <%
            }
        %>
      </ul>
    </div>
  </div>
</div>
